package Logging;

import java.text.SimpleDateFormat;
import java.util.Date;

/*
 * DateStamp simplifies the use of printing data and time.
 */
public class DateStamp {
	public DateStamp() {
	}
	
	// Date and time stamp for logging.
	public String stamp() {
		return printDate("[dd/MMM/yyyy:HH:mm:ss Z]");
	}

	// Takes in the string that represents the format to print date and time.
	public String printDate(String format) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);
        Date resultDate = new Date();
        return dateFormat.format(resultDate);
    }
	
}
